package cn.csc.module.product.controller.admin.category.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import java.math.BigInteger;

/**
* 分类信息 Base VO，提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
*/
@Data
public class CategoryBaseVO {

    @ApiModelProperty(value = "店铺id", required = true)
    @NotNull(message = "店铺id不能为空")
    private BigInteger shopId;

    @ApiModelProperty(value = "父ID", required = true)
    @NotNull(message = "父ID不能为空")
    private BigInteger parentId;

    @ApiModelProperty(value = "分类名称")
    private String name;

    @ApiModelProperty(value = "分类描述")
    private String descInfo;

    @ApiModelProperty(value = "分类地址{parent_id}-{child_id},...", required = true)
    private String path;

    @ApiModelProperty(value = "状态 1:enable, 0:disable, -1:deleted", required = true)
    @NotNull(message = "状态 1:enable, 0:disable, -1:deleted不能为空")
    private Integer status;

    @ApiModelProperty(value = "分类图标")
    private String icon;

    @ApiModelProperty(value = "子类目数量")
    private Integer itemNum;

    @ApiModelProperty(value = "分类的显示图片")
    private String imgUrl;

    @ApiModelProperty(value = "banner显示图片")
    private String bannerUrl;

    @ApiModelProperty(value = "分类层级 从0开始", required = true)
    //@NotNull(message = "分类层级 从0开始不能为空")
    private Integer level;

    @ApiModelProperty(value = "排序")
    private Integer seq;

    @ApiModelProperty(value = "精钢区序号")
    private Integer markLabel;

    @ApiModelProperty(value = "好货速度序号")
    private Integer typeLabel;

    @ApiModelProperty(value = "商品数量")
    private Integer productNum;

    @ApiModelProperty(value = "佣金比列")
    @Max(value = 99,message = "最大值为99")
    private Integer commissionRate;

}
